package com.wing.product.model.response;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wing.bill.model.enums.OrderSourceEnum;
import com.wing.bill.model.enums.ShipmentOrderStatusEnum;
import com.wing.mybatis.common.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "warehouse_order_detail")
public class ShipmentOrderInfoVO extends BaseEntity<ShipmentOrderInfoVO> {

    @Schema(description = "订单ID")
    private Integer orderId;

    @Schema(description = "订单编号")
    private String orderCode;

    @Schema(description = "发货订单编号")
    private String shipmentOrderCode;

    @Schema(description = "客户编号")
    private Long customerId;

    @Schema(description = "运输公司ID")
    private Long transportCompanyId;

    @Schema(description = "物流方式ID")
    private String transportModeId;

    @Schema(description = "货运单号")
    private String waybill;

    @Schema(description = "车辆ID")
    private Long vehicleId;

    @Schema(description = "车牌号")
    private String plateNo;

    @Schema(description = "司机ID")
    private Long driverId;

    @Schema(description = "司机名称")
    private String driverName;

    @Schema(description = "司机电话")
    private String driverPhone;

    @Schema(description = "数据来源")
    private Integer source;

    private String sourceDesc;

    @Schema(description="合计重量")
    private Double totalWeight;
    private Double netWeight;
    private Double grossWeight;

    @Schema(description="发货数量")
    private Double totalQuantity;

    public void setSource(Integer source){
        this.source = source;
        this.sourceDesc = OrderSourceEnum.getDescByCode(source);
    }

    private String shipmentOrderStatusDesc;
    private String shipmentOrderStatus;

    public void setShipmentOrderStatus(String shipmentOrderStatus){
        this.shipmentOrderStatus = shipmentOrderStatus;
        this.shipmentOrderStatusDesc = ShipmentOrderStatusEnum.getDescByCode(shipmentOrderStatus);
    }



    private List<ShipmentOrderDetailInfoVO> shipmentOrderDetailInfoList;

}
